package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SelfBookingConfigMapper;
import com.ruoyi.system.domain.SelfBookingConfig;
import com.ruoyi.system.service.ISelfBookingConfigService;

/**
 * 自助预订配置Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-16
 */
@Service
public class SelfBookingConfigServiceImpl implements ISelfBookingConfigService
{
    @Autowired
    private SelfBookingConfigMapper selfBookingConfigMapper;

    /**
     * 通过id查询自助预订配置
     *
     * @param id 自助预订配置主键
     * @return 自助预订配置
     */
    @Override
    public SelfBookingConfig selectSelfBookingConfigById(Long id)
    {
        return selfBookingConfigMapper.selectSelfBookingConfigById(id);
    }

    /**
     * 查询自助预订配置列表
     *
     * @param storeName 门店名称
     * @return 自助预订配置
     */
    @Override
    public List<SelfBookingConfig> selectSelfBookingConfigListByName(String storeName)
    {
        return selfBookingConfigMapper.selectSelfBookingConfigListByName(storeName);
    }

    /**
     * 新增自助预订配置
     *
     * @param selfBookingConfig 自助预订配置
     * @return 结果
     */
    @Override
    public int insertSelfBookingConfig(SelfBookingConfig selfBookingConfig)
    {
        return selfBookingConfigMapper.insertSelfBookingConfig(selfBookingConfig);
    }

    /**
     * 修改自助预订配置
     *
     * @param selfBookingConfig 自助预订配置
     * @return 结果
     */
    @Override
    public int updateSelfBookingConfig(SelfBookingConfig selfBookingConfig)
    {
        return selfBookingConfigMapper.updateSelfBookingConfig(selfBookingConfig);
    }

    /**
     * 批量删除自助预订配置信息
     *
     * @param ids 需要删除的自助预订配置主键
     * @return 结果
     */
    @Override
    public int deleteSelfBookingConfigByIds(Long[] ids)
    {
        return selfBookingConfigMapper.deleteSelfBookingConfigByIds(ids);
    }

    /**
     * 删除自助预订配置信息
     *
     * @param id 自助预订配置主键
     * @return 结果
     */
    @Override
    public int deleteSelfBookingConfigById(Long id)
    {
        return selfBookingConfigMapper.deleteSelfBookingConfigById(id);
    }
}
